<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateOrderEvaluateTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('order_evaluate', function (Blueprint $table) {
            $table->increments('id');
            $table->integer("userid")->comment("用户ID");
            $table->integer("order_id")->comment("订单ID");
            $table->string("order_sn")->comment("订单编号");
            $table->integer("goods_id")->comment("商品编号");
            $table->string("content",500)->nullable()->comment("评价内容");
            $table->text("image")->nullable()->comment("图片");
            $table->integer("star")->default(5)->comment("等级");
            $table->integer("read")->default(0)->comment("阅读量");
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('order_evaluate');
    }
}
